// ==========================================================================
// GFast自动生成service操作代码。
// 生成日期：2023-11-08 10:11:31
// 生成路径: internal/app/plugin/mail/service/plugin_mail.go
// 生成人：gfast
// desc:邮件发送
// company:云南奇讯科技有限公司
// ==========================================================================

package service

import (
	"context"
	"github.com/tiger1103/gfast/v3/internal/app/plugins/mail/model"
)

type IPluginMail interface {
	List(ctx context.Context, req *model.PluginMailSearchReq) (res *model.PluginMailSearchRes, err error)
	GetById(ctx context.Context, Id uint) (res *model.PluginMailInfoRes, err error)
	Add(ctx context.Context, req *model.PluginMailAddReq) (err error)
	Edit(ctx context.Context, req *model.PluginMailEditReq) (err error)
	Delete(ctx context.Context, Id []uint) (err error)
	SendData(ctx context.Context, req *model.MailReq) (err error)
}

var localPluginMail IPluginMail

func PluginMail() IPluginMail {
	if localPluginMail == nil {
		panic("implement not found for interface IPluginMail, forgot register?")
	}
	return localPluginMail
}

func RegisterPluginMail(i IPluginMail) {
	localPluginMail = i
}
